<script src="http://protozoa.googlecode.com/svn/trunk/js/functions.js"></script>
<script src="http://protozoa.googlecode.com/svn/trunk/js/dom.js"></script>
<script src="http://protozoa.googlecode.com/svn/trunk/js/dom.event.js"></script>
<script src="http://protozoa.googlecode.com/svn/trunk/js/utils.js"></script>

<script>

var count = 0;

var actions = [
	function(){  },
	function(){ ++count },
	function(){ ++count },
	function(){ ++count },
];


var c = load_file('lex3.js');

var lexer = function() {
	count = 0;

var i = 0;
var max = c.length;

initial: while (i < max) {
    C0: switch (c[i+0]) {
        case "f":
            C1: switch (c[i+1]) {
                case "u":
                    C2: switch (c[i+2]) {
                        case "n":
                            C3: switch (c[i+3]) {
                                case "c":
                                    C4: switch (c[i+4]) {
                                        case "t":
                                            C5: switch (c[i+5]) {
                                                case "i":
                                                    C6: switch (c[i+6]) {
                                                        case "o":
                                                            C7: switch (c[i+7]) {
                                                                case "n":
                                                                    /* function: function (){ ++count } */
                                                                    ++count;
                                                                    i += 8;
                                                                    continue initial;
                                                            }
                                                            break C1;
                                                    }
                                                    break C1;
                                            }
                                            break C1;
                                    }
                                    break C1;
                            }
                            break C1;
                    }
                    break C1;
            }
            /* .: function (){} */
            //actions[0]();
            i += 1;
            continue initial;
        case "v":
            C1: switch (c[i+1]) {
                case "a":
                    C2: switch (c[i+2]) {
                        case "r":
                            /* var: function (){ ++count } */
                            ++count;
                            i += 3;
                            continue initial;
                    }
                    break C1;
            }
            /* .: function (){} */
            //actions[0]();
            i += 1;
            continue initial;
        case "b":
            C1: switch (c[i+1]) {
                case "r":
                    C2: switch (c[i+2]) {
                        case "e":
                            C3: switch (c[i+3]) {
                                case "a":
                                    C4: switch (c[i+4]) {
                                        case "k":
                                            /* break: function (){ ++count } */
                                            ++count;
                                            i += 5;
                                            continue initial;
                                    }
                                    break C1;
                            }
                            break C1;
                    }
                    break C1;
            }
            /* .: function (){} */
            //actions[0]();
            i += 1;
            continue initial;
        default:
            /* .: function (){} */
            //actions[0]();
            i += 1;
            continue initial;
    }
}
return count;
};

//alert(lexer());

run_time_test(lexer);

</script>

